<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>浮动</title>
    <style>
        /*浮动  会脱离标准文档*/
        /*浮动再页面上 原位置不保留*/
        /*相对于原来的位置进行浮动*/
        body>div{
            height: 600px;
            width: 500px;
            border: black 1px solid;
        }

        div div:nth-child(1){
            width: 200px;
            height: 200px;
            background-color: red;
            float: right;
        }
        body div:nth-child(2){
            width: 200px;
            height: 200px;
            background-color: blue;
            float: right;
        }
        body div:nth-child(3){
            width: 200px;
            height: 200px;
            background-color: yellow;
            float: right;
        }
    </style>
</head>
<body>
<div>
    <div></div>
    <div></div>
    <div></div>
</div>

</body>
</html>